import mockjs from 'mockjs';
import {DataItem} from '@/store';

export const getFlatListData = (): DataItem[] =>
  mockjs.mock({
    'data|50': [
      {
        id: '@guid',
        title: '@title(2,4)',
        author: '@first',
        desc: '@sentence(8,20)',
        paragraph: '@paragraph(5, 10)',
        isSave: false,
        star: () => {
          return Math.round(Math.random() * 10000);
        },
      },
    ],
  }).data;
